package com.example.springboot_test.easyexcel.model.builder;

import com.example.springboot_test.easyexcel.model.RowHeightColWidthModel;
import lombok.Getter;

/**
 * 行高列宽信息Builder
 *
 * @author xudongmaster
 */
@Getter
public class RowHeightColWidthModelBuilder extends SheetModelBuilder {

    /**
     * 行号
     */
    private Integer rowIndex;
    /**
     * 列号
     */
    private Integer colIndex;
    /**
     * 行高
     */
    private Float rowHeight;
    /**
     * 列宽
     */
    private Integer colWidth;

    protected RowHeightColWidthModelBuilder(String sheetName) {
        super(sheetName);
    }

    public static RowHeightColWidthModelBuilder builder(String sheetName) {
        return new RowHeightColWidthModelBuilder(sheetName);
    }

    public RowHeightColWidthModelBuilder rowIndex(Integer rowIndex) {
        this.rowIndex = rowIndex;
        return this;
    }

    public RowHeightColWidthModelBuilder colIndex(Integer colIndex) {
        this.colIndex = colIndex;
        return this;
    }

    public RowHeightColWidthModelBuilder rowHeight(Float rowHeight) {
        this.rowHeight = rowHeight;
        return this;
    }

    public RowHeightColWidthModelBuilder colWidth(Integer colWidth) {
        this.colWidth = colWidth;
        return this;
    }

    @Override
    public RowHeightColWidthModel build() {
        return new RowHeightColWidthModel(this);
    }
}
